/*
 * Copyright (C) 2018 Donlon.
 *
 * 2018秋季C语言练习题（4）
 * http://10.105.242.83/contest/484/
 *
 * B. 小球触地
 */

#include<stdio.h>
#include<math.h>

int main(){
  int h, n;
  scanf("%d %d", &h, &n);

  float s;

  float hf = (float)h;
  s = hf;
  int i;
  for(i = 1; i < n; i++){
    s += hf;
    hf /= 2.f;
  }

  printf("distance=%.1f,height=%.1f", s, (double)h / pow(2, n));
}